<template>
    <div>
        <ul>
            <li v-for="(item,index) in numbers" :key="index">
                {{item}}
            </li>
        </ul>

        <ul>
            <li v-for="(item,index) in employees" :key="index">
                姓名：{{item.name}} - 年龄：{{item.age}}
            </li>
        </ul>
    </div>
</template>

<script>
    export default {
        name: 'vfor',
        data() {
            return {
                numbers: [20, 23, 18, 65, 32, 19, 54, 56, 41],
                employees: [
                    {name: '许亚恒', age: 18},
                    {name: '张三', age: 30},
                    {name: '李四', age: 36},
                    {name: '王五', age: 45}
                ]
            }
        }
    }
</script>
<style scoped>
</style>
